package gxdlxy.zx2201;

public class Person {
    private final String ID = "340123200012120000";
    public String name = "张三";
    private float weight = 60.5F;

    public String getID() {
        return this.ID;
    }
    public void setWeight(float weight){
        if(weight > 500) {
            System.out.println("请不要两个人一起上秤");
            return;
        }
        this.weight = weight;
    }
}
class Police{
    void checkID(Person person) {
        System.out.println(person.getID() + "身份证无异常");
    }

    public static void main(String[] args) {
        Person 张三 = new Person();
        // 张三.weight = 500;
        张三.setWeight(600);

        Police 黑猫警长 = new Police();
        黑猫警长.checkID(张三);
    }
}
